﻿using FluentNHibernate.Mapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace mscook.core.domain
{
    public class MaterialMap : ClassMap<Material>
    {
        public MaterialMap()
        {
            Id(o => o.Id);
            Map(o => o.CreateTime);
            Map(o => o.IsDelete);
            Map(o => o.Version);
            Map(o => o.EntityIndex);
            Map(o => o.ImageName);
            References<MaterialOfCookBook>(o => o.MaterialOfCookBook).Nullable().Column("MaterialOfBookId");
            Map(o => o.Name);
            Map(o=>o.Summary);
            Map(o=>o.Editor);
            Map(o => o.Description).CustomType("StringClob").CustomSqlType("nvarchar(max)");
        }
    }
}
